package cn.sunjinxin.trade.application.work;

import cn.sunjinxin.trade.application.work.node.ProductBusinessValidateNode;
import cn.sunjinxin.trade.application.work.pipeline.ProductValidateWorkHandler;
import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.experimental.FieldDefaults;

import java.util.List;

/**
 * @author issavior
 */
@Getter
@AllArgsConstructor
@FieldDefaults(makeFinal = true, level = lombok.AccessLevel.PRIVATE)
public enum ValidateWorkContainer {

    PREORDER {
        @Override
        public List<ProductValidateWorkHandler> list() {
            return Lists.newArrayList(new ProductBusinessValidateNode());
        }
    },
//    ORDER_CREATE {
//        @Override
//        public List<PreOrderValidateWorkHandler> list() {
//            return Lists.newArrayList(new BaseBusinessValidateNode(), new ProductBusinessValidateNode());
//        }
//    },
//    ORDER_PAY_URL {
//        @Override
//        public List<PreOrderValidateWorkHandler> list() {
//            return Lists.newArrayList(new BaseBusinessValidateNode(), new ProductBusinessValidateNode());
//        }
//    },

    ;

    public abstract List<ProductValidateWorkHandler> list();


}
